package com.aaa.service.impl;

import com.aaa.dao.TestTypeDao;
import com.aaa.entity.TestType;
import com.aaa.service.TestTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;

/**
 * @Author:  whr
 * @Description 测试类型实习类
 * @Date 2022.07.04
 * @Modifiel
 */
@Service
public class TestTypeServiceImpl implements TestTypeService {

    @Autowired
    private TestTypeDao testTypeDao;

    /**
     * 查询所有测试类型
     * @return List<TestType>
     */
    @Override
    public List<String> selectTestType() {
        List<TestType> testTypes = testTypeDao.selectTestType();
        List<String> testTypeList = new ArrayList();
        /**
         * 取出所有test_type(测试类型)
         */
        for (TestType testType:testTypes){
            testTypeList.add(testType.getTestType());
        }
        return testTypeList;
    }
}
